package com.sc.nft.admin.rpc;

import com.sc.nft.admin.request.IdRequest;
import com.sc.nft.dto.DelSettlementRewardsDTO;
import com.sc.nft.service.MerchantPledgeTaskSettlementRewardsLogService;
import com.sc.nft.service.UserInfoService;
import com.sc.nft.sup.Result;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/rpc/merchantPledgeTask")
public class MerchantPledgeTaskRpc {

    private final MerchantPledgeTaskSettlementRewardsLogService merchantPledgeTaskSettlementRewardsLogService;


    @PostMapping(value = "/delSettlementRewardsByUserRecordsId", produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "删除商户质押待结算记录", notes = "删除商户质押待结算记录", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<DelSettlementRewardsDTO> delSettlementRewardsByUserRecordsId(@RequestBody IdRequest request) {
        return Result.success(merchantPledgeTaskSettlementRewardsLogService.delSettlementRewardsByUserRecordsId(request.getId()));
    }
}
